#!/usr/bin/perl -w
use strict;
use DBI;

my $dsn = "DBI:mysql:database=docker;host=192.168.11.29;port=3306";
my $user = 'zoufuxing';
my $passwd = 'zoufuxing';

my ($dbh,$sth,@ary);

$dbh = DBI->connect($dsn,$user,$passwd);  #连接数据库
$sth = $dbh->prepare("select * from docker"); #准备
$sth->execute();

while(@ary = $sth->fetchrow_array){
	print join("\t",@ary),"\n";
}

$sth->finish;
$dbh->disconnect;



